from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import ConversationViewSet, MessageViewSet, QAViewSet, FeedbackViewSet

router = DefaultRouter()
router.register('conversations', ConversationViewSet, basename='conversation')
router.register('messages', MessageViewSet, basename='message')
router.register('feedback', FeedbackViewSet, basename='feedback')

urlpatterns = [
    path('', include(router.urls)),
    path('ask/', QAViewSet.as_view({'post': 'ask'}), name='ask'),
    path('history/', QAViewSet.as_view({'get': 'history'}), name='history'),
]
